﻿using System.Collections.Generic;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using Twins.Infrastructure;
using Twins.Interface;
using Twins.Interface.IHandler;
using Twins.Interface.IProcesser;

namespace Twins.Classes.Hanlder.HanlderStatement
{
    public class HanlderForIExpressionStatement : IHandler<IExpressionStatement>
    {
        public IEnumerable<ILineCode> DoFor(IExpressionStatement expressionStatement)
        {
            var processerCSharpExpression = IoC.Resolve<IProcesser>("ProcesserCSharpExpression"); 
            return processerCSharpExpression.DoSomethingWith(expressionStatement.Expression);    
        }

        public IEnumerable<ILineCode> DoFor(object obj)
        {
           return DoFor((IExpressionStatement)obj);
        }
    }
}